<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="INFO">
    <Appenders>
        <Console name="STDOUT" target="SYSTEM_OUT">
            <PatternLayout pattern="[%p][%d{yyyy-MM-dd HH:mm:ss}][%t][%c] %m%n"/>
        </Console>
        <RollingRandomAccessFile name="file"
                                 fileName="logs/all.log"
                                 filePattern="logs/all-%d{yyyy-MM-ddHHmmss}.log.gz">
            <PatternLayout>
                <Pattern>[%p][%d{yyyy-MM-dd HH:mm:ss}][%t][%c] %m%n</Pattern>
            </PatternLayout>
            <Policies>
                <CronTriggeringPolicy schedule="0 0 0 * * ? *" evaluateOnStartup="true"/>
            </Policies>
        </RollingRandomAccessFile>
        <RollingRandomAccessFile name="error"
                                 fileName="logs/error.log"
                                 filePattern="logs/error-%d{yyyy-MM-ddHHmmss}.log.gz">
            <PatternLayout>
                <Pattern>[%p][%d{yyyy-MM-dd HH:mm:ss}][%t][%c] %m%n</Pattern>
            </PatternLayout>
            <Filters>
                <ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
            </Filters>
            <Policies>
                <CronTriggeringPolicy schedule="0 0 0 * * ? *" evaluateOnStartup="true"/>
            </Policies>
        </RollingRandomAccessFile>
    </Appenders>
    <Loggers>
        <Root level="DEBUG">
            <AppenderRef ref="STDOUT"/>
            <AppenderRef ref="file"/>
            <AppenderRef ref="error"/>
        </Root>
        <Logger name="org.springframework" level="INFO" additivity="true"/>
        <Logger name="${group}.mapper" level="DEBUG" additivity="true"/>
    </Loggers>
</Configuration>